---------------------------------------------------------------------------
FileNotFoundError Traceback (most recent call last)
F:\anaconda\lib\site-packages\graphviz-0.8.4-py3.6.egg\graphviz\backend.py in pipe(engine, format, data, quiet)
158 stdout=subprocess.PIPE, stderr=subprocess.PIPE,
--> 159 **POPEN_KWARGS)
160 except OSError as e:
F:\anaconda\lib\subprocess.py in __init__(self, args, bufsize, executable, stdin, stdout, stderr, preexec_fn, close_fds, shell, cwd, env, universal_newlines, startupinfo, creationflags, restore_signals, start_new_session, pass_fds, encoding, errors)
708 errread, errwrite,
--> 709 restore_signals, start_new_session)
710 except:
F:\anaconda\lib\subprocess.py in _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, unused_restore_signals, unused_start_new_session)
996 os.fspath(cwd) if cwd is not None else None,
--> 997 startupinfo)
998 finally:
FileNotFoundError: [WinError 2] The system cannot find the file specified
During handling of the above exception, another exception occurred:
ExecutableNotFound Traceback (most recent call last)
<ipython-input-32-5a48441beb57> in <module>()
----> 1 plot_tree(clf)
F:\anaconda\lib\site-packages\xgboost\plotting.py in plot_tree(booster, fmap, num_trees, rankdir, ax, **kwargs)
259
260 s = BytesIO()
--> 261 s.write(g.pipe(format='png'))
262 s.seek(0)
263 img = image.imread(s)
F:\anaconda\lib\site-packages\graphviz-0.8.4-py3.6.egg\graphviz\files.py in pipe(self, format)
123 data = text_type(self.source).encode(self._encoding)
124
--> 125 outs = backend.pipe(self._engine, format, data)
126
127 return outs
F:\anaconda\lib\site-packages\graphviz-0.8.4-py3.6.egg\graphviz\backend.py in pipe(engine, format, data, quiet)
160 except OSError as e:
161 if e.errno == errno.ENOENT:
--> 162 raise ExecutableNotFound(args)
163 else: # pragma: no cover
164 raise
ExecutableNotFound: failed to execute ['dot', '-Tpng'], make sure the Graphviz executables are on your systems' PATH